home *** CD-ROM | disk | FTP | other *** search
- Path: beavis.kronos.com!usenet
- From: porter_woodward@internet.kronos.com (Porter Woodward)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: AB3D II beats Quake....
- Date: 3 Apr 1996 12:30:04 GMT
- Organization: Software Quality Assurance
- Distribution: world
- Message-ID: <4jtr0c$3vn@beavis.kronos.com>
- References: <4jbkpc$mbr@mopo.cc.lut.fi> <1434.6662T1116T1344@epma.demon.co.uk> <6932.6665T243T2605@mbox.vol.it>
- NNTP-Posting-Host: 158.228.60.147
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In article <6932.6665T243T2605@mbox.vol.it>, bizzetti@mbox.vol.it says...
- >
- >
- >>>>C is slow as hell, and if you say "it's fast enough with a 700Mhz CPU" then
- >>>>I tell you that also assembly becomes faster with the 700Mhz CPU. You're
- >>>>running away from your shadow: ASM will always be losta faster and better
- >>>>than C.
- >
- >>F(l)abio, ;-)
- >
- >>I agree with you that 68000 is neccesary to get the best out of the
- >>amiga, not many demos etc. are written in C (thank god!). However you are
- >>wrong to assume that compilers cannot generate code as well as humans. As we
- >>are moving into the RISC era, CPUs have fewer instructions which are a lot
- >>easier for a compiler to make great code with, in fact on certain mainframe
- >>systems compilers generate code which is as fast as we could write in asm.
- >
- >Yes :) but why it must be asm or C? :)
-
- There is no need to treat them as mutually exclusive! In fact,
- I've found it highly useful to do time intensive (on CPU) operations with
- assembly routines, and call them from C/C++. Something like an integer
- based square root routine with no divide operands... Then instead of
- calling the normal C sqr function, I call my own asm sqroot function, and
- pass the parameter in D0! Works very quickly.
-
- >1) asm gets too complex. In this case, I recall the old days of 6502 and it
-
- Ahh yes - I remember it now - Computer Science courses from high
- school! Having to write your own routines to do multiplication and division, etc.
- It wasn't so bad really - It's just that there was _nothing_ to work with, you had
- to do it all. All the stupid little statements that you take for granted in a higher
- level language didn't exist.
-
- In essence, the trend is toward very, very complex assembly language
- on CPUs. With the next generation (probably VLIW) most people will find it very
- difficult to code in assembly. RISC is bad enough. However, I don't think a
- computer will be able to replace a human in terms of "high level" optimizations.
- That is being able to look at the overall problem and come up with all sorts of
- schemes to speed stuff up. There will still be a place for "hand tuning".
-
- >2) If you think that C and ASM performaces get closer new CPU after new CPU,
- > I can't really agree. The reasons you explained before make people exploit
- > less the assembly advantages, for the implicit idea to keep on the tradition
- > with pure assembly, where they should know that assembly itself is already
- > not M/L. If C was really so good (and can't be, for definition, because it's
- > a portable language, thus cannot be optimized to the best possible), then why
-
- C by definition isn't portable. Each machine has an implementation
- specific to it, and it alone. The end result is a language that most computers
- have compilers for that can translate the higher level language to native
- CPU operands. That is like saying BASIC is portable. Yeah, the program code
- you wrote might be, but the BASIC compiler/interpreter isn't.
-
- One thing about the 680x0/80x86 compiler war. It's really only
- recently that compilers have been optimized to take advantage of the larger
- register set on the 680x0 processors (say about 5 years) - prior to that compiler
- theory wasn't all that great - and it really was only in the early 80s that C
- was coming into vogue! Prior to that, computers were pretty simple affairs (at
- least those available in any massiv scale). As compiler theory advances, you
- will find that they will be able to take advantage of cpus with register sets (say
- 64 data registers) in ways that we can't really understand.
-
- - Porter Woodward
-
- --
- ****************************************************************
- (Oh, so that's what's on the other side!)
- o "Sometimes truth IS stranger than fiction."
- o I can be reached at:
- o porter_woodward@internet.kronos.com -daytime
- \|/ OR woodward@acad.wit.edu -nights
- @ @ OR http://www.kronos.com/~porter/ -always
- ___oOO_(_)_OOo__________________________________________________
- | | | | | | | | | | | | |INTEL | |
- |+------------------------------------+ | @ | | OUTSIDE |
- || //\ | | | | | | |
- ||\X/--\MiGA - Make up your own mind. | | | |JUST SAY NO|
- @ |+------------------------------------+ | | o| | TO| |
- | | | | | | | | | | |* | | Micro$oft |
- ////////////////////////////////////////////////////////////////
-
-